package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 出版社查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "出版社查询条件", description = "出版社查询的条件参数")
public class PublisherQuery extends BaseQuery {

    @Schema(description = "出版社名称", example = "人民邮电")
    private String name;

    @Schema(description = "出版社英文名", example = "Posts")
    private String nameEn;

    @Schema(description = "出版社编码", example = "PTP")
    private String code;

    @Schema(description = "所在国家", example = "中国")
    private String country;

    @Schema(description = "所在城市", example = "北京")
    private String city;

    @Schema(description = "状态 (0-禁用, 1-启用)", example = "1")
    private Integer status;

    @Schema(description = "成立开始日期", example = "1900-01-01")
    private LocalDate foundedStartDate;

    @Schema(description = "成立结束日期", example = "2024-12-31")
    private LocalDate foundedEndDate;

    @Schema(description = "最小图书数量", example = "1")
    private Integer minBookCount;

    @Schema(description = "最大图书数量", example = "1000")
    private Integer maxBookCount;

    @Schema(description = "关键词搜索", example = "技术")
    private String keyword;

    @Schema(description = "排序字段", example = "bookCount")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "desc")
    private String sortOrder;
}
